import Vue from 'vue'
// 引入element-ui的翻译包
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
// 引入人资的翻译包
import menuEn from './en'
import menuZh from './zh'

import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
export default new VueI18n(
  {
    locale: localStorage.getItem('lang') || 'zh',
    messages: {
      zh: {
        goodDay: '科三考了七次，手雷拌饭',
        cut: '切换语言成功',
        ...zhLocale,
        ...menuZh
      },
      en: {
        goodDay: 'Seven times in class three, hand grenade bibimbap',
        cut: 'Switching language succeeded',
        ...enLocale,
        ...menuEn
      }
    }
  }
)
